package com.button.boot.rabbitmq.manager;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import com.button.boot.rabbitmq.config.RabbitMqConfigure;

@Component
@RabbitListener(queues = RabbitMqConfigure.QUEUE_A)
public class RabbitMqReceiver {
    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    @RabbitHandler
    public void process(String content) {
        logger.info("接收到QUEUE_A中的消息. content={}", content);
    }
}
